package com.maxmlr.base.proxy;

import sun.reflect.CallerSensitive;

import java.util.function.BiFunction;

/**
 * @ClassName MyProxy
 * @Description 动态代理
 * @Author maxiao
 * @Date 2020/3/6 上午10:57
 * @Version V1.0
 */
public class MyProxy {

    @CallerSensitive
    public static Object newProxyInstance(ClassLoader loader, MyInvocationHandler h)
            throws IllegalArgumentException
    {
        //1、

        return null;
    }

    private static final class ProxyClassFactory
            implements BiFunction<ClassLoader, Class<?>[], Class<?>>
    {

        private static final String proxyClassNamePrefix = "$Proxy";

        @Override
        public Class<?> apply(ClassLoader classLoader, Class<?>[] classes) {
            return null;
        }
    }


}
